package org.jugile.demo.domain;


import java.lang.reflect.Method;
import org.jugile.util.*;
import org.jugile.daims.BoCollection;

import org.jugile.demo.common.*;


public class BookCollection extends BoCollection<Book> {

	public BookCollection() { super(Book.class); }

	
	// ----- set operations ------
	public BookCollection and(BookCollection oc) {
		return (BookCollection)and(new BookCollection(), oc);
	}
	public BookCollection or(BookCollection oc) {
		return (BookCollection)or(new BookCollection(), oc);
	}	
	public BookCollection xor(BookCollection oc) {
		return (BookCollection)xor(new BookCollection(), oc);
	}	
	public BookCollection not(BookCollection oc) {
		return (BookCollection)not(new BookCollection(), oc);
	}	

	public BookCollection keep(String mname) {
		return (BookCollection)keep(new BookCollection(), mname);
	}	
	public BookCollection not(String mname) {
		return (BookCollection)not(new BookCollection(), mname);
	}	


	// ---- attribute finders ----
	public BookCollection byTitle(String v) { q("==", "title", v); return this; }
	public BookCollection byTitle(String op, String v) { q(op, "title", v); return this; }
	public BookCollection byPages(int v) { q("==", "pages", v); return this; }
	public BookCollection byPages(String op, int v) { q(op, "pages", v); return this; }
	public BookCollection byType(BookType v) { q("==", "type", v); return this; }
	public BookCollection byType(String op, BookType v) { q(op, "type", v); return this; }
	public BookCollection byPublished(Time v) { q("==", "published", v); return this; }
	public BookCollection byPublished(String op, Time v) { q(op, "published", v); return this; }
	public BookCollection byFree(boolean v) { q("==", "free", v); return this; }
	public BookCollection byFree(String op, boolean v) { q(op, "free", v); return this; }
	public BookCollection byDesc(String v) { q("==", "desc", v); return this; }
	public BookCollection byDesc(String op, String v) { q(op, "desc", v); return this; }
	public BookCollection byFactor(double v) { q("==", "factor", v); return this; }
	public BookCollection byFactor(String op, double v) { q(op, "factor", v); return this; }
	public BookCollection byPrice(Money v) { q("==", "price", v); return this; }
	public BookCollection byPrice(String op, Money v) { q(op, "price", v); return this; }
 
	// --- selfref ---
	public BookCollection byParent(Book v) { q("==", "parent", v); return this; }
 
	// --- n - 1 ----
	public BookCollection byMainAuthor(Author v) { q("==", "mainAuthor", v); return this; }
	public BookCollection byCoAuthor(Author v) { q("==", "coAuthor", v); return this; }
 

	// ---- filtering finders ----
 
	
}